# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-asteval
pkgver=0.9.29
_commit=981a163e475c69fcd4bd29f5632e38da79bc40e7
pkgrel=2
pkgdesc="Minimalistic evaluator of python expression using ast module"
url="https://github.com/newville/asteval"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm' 'python-wheel')
checkdepends=('python-pytest-cov' 'python-numpy')
source=("git+https://github.com/newville/asteval.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd asteval
  python -m build -nw
}

check() {
  cd asteval
  python -m pytest
}

package() {
  cd asteval
  python -m installer -d "$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
